﻿using System.Dynamic;
using System.Windows.Input;
using ALC.Core.Enums;
using WPFCommon.Commands;
using WPFCommon.ViewModels.Base;

namespace ALC.Core.ViewModels.Application
{
    public class SettingsViewModel : ViewModelBase
    {
        #region prop

        public static SettingsViewModel Instance { get; } = new SettingsViewModel();

        public SettingPageType SettingPageType { get; set; }

        public ICommand GotoPosition2DSettingsPageCommand { get; set; }
        public ICommand GotoMeasureSettingsPageCommand { get; set; }
        public ICommand GotoBalanceSettingsPageCommand { get; set; }
        public ICommand GotoLogSettingsPageCommand { get; set; }

        #endregion

        #region ctor

        public SettingsViewModel()
        {
            GotoBalanceSettingsPageCommand = new SimpleCommand(o => SettingPageType = SettingPageType.Balance, o => SettingPageType != SettingPageType.Balance); 
            GotoLogSettingsPageCommand = new SimpleCommand(o => SettingPageType = SettingPageType.Log, o => SettingPageType != SettingPageType.Log); 
            GotoMeasureSettingsPageCommand = new SimpleCommand(o => SettingPageType = SettingPageType.Measure, o => SettingPageType != SettingPageType.Measure); 
            GotoPosition2DSettingsPageCommand = new SimpleCommand(o => SettingPageType = SettingPageType.Position2D, o => SettingPageType != SettingPageType.Position2D); 
        }

        #endregion
    }
}